package com.travel.server.manager.dao;

import com.travel.server.manager.model.DepartmentMenu;
import com.travel.server.manager.model.DepartmentMenuExample;
import java.util.List;

import com.travel.server.manager.model.dto.PermissionDto;
import org.apache.ibatis.annotations.Param;

public interface DepartmentMenuDao {
    int countByExample(DepartmentMenuExample example);

    int deleteByExample(DepartmentMenuExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(DepartmentMenu record);

    int insertSelective(DepartmentMenu record);

    List<DepartmentMenu> selectByExample(DepartmentMenuExample example);

    DepartmentMenu selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") DepartmentMenu record, @Param("example") DepartmentMenuExample example);

    int updateByExample(@Param("record") DepartmentMenu record, @Param("example") DepartmentMenuExample example);

    int updateByPrimaryKeySelective(DepartmentMenu record);

    int updateByPrimaryKey(DepartmentMenu record);

    /**
     * 查询用户权限
     * @param userId
     * @return
     */
    List<PermissionDto> selectUserPermission(Integer userId);

    /**
     * 删除部门所有权限
     * @param departmentId
     * @return
     */
    int deleteAllPermission(Integer departmentId);
}